#{extends 'frameHome.html' /} #{set title:'EntityIdeas' /}#{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">
#{/set}

<script type="text/javascript">
	$(document).ready(
			function() {
				$('.left, .content input, .content textarea, .content select')
						.focus(function() {
							$(this).parents('.row').addClass("over");
						}).blur(function() {
							$(this).parents('.row').removeClass("over");
						});
			});
</script>

<div id=right>

	<script type="text/javascript">
		function createTarget(t) {
			window.open("", t, "width=600,height=550");
			return true;
		}
	</script>

	<head>
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/main.css'}">

<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}">

	</head>



	<div id=main>

		<div id="Entity-Ideas">
			<h1>
				<b>Entity Ideas</b>
			</h1>

			<form action="@{PostingIdea.selectAllEntityIdeas() }">
				#{if ideaList}#{list items:ideaList, as:'idea'} #{if idea.hide==false}
				<li><a href="@{PostingIdea.ShowIdea(idea.id)}"><input
						type="checkbox" name="box" value=${idea} />${idea.title}</a> 
					Posted By: ${idea.author.name}</li>#{/if}#{/list} <a
					href="@{PostingIdea.PostToEntity(entity.id)}" class="pill button">Post
					idea to Entity</a></br>
					 #{if isOrganizer || merger.email==entity.organization.lead.email} #{if size>1} <input
					type="submit" value="Submit Merged Ideas"onclick="JavaScript:alert('are you sure you want to merge selected one??!')"  />
			#{/if} #{/if} #{/if}
				#{else} Sorry! This entity has no Ideas <a
					href="@{PostingIdea.PostToEntity(entity.id)}" class="pill button">Post
					idea to Entity</a></br> <a href="@{Entity.viewEntity(entity.id)}"
					class="pill button">Back to Entity</a> </br> #{/else}


			</form>
			
		</div>
	</div>
</div>